package com.example.controller;

import com.example.entity.SysRole;
import com.example.service.SysRoleService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RequestMapping("role")
@RestController
public class SysRoleController {

    @Autowired
    SysRoleService sysRoleService;
    @RequestMapping("page")
    public String getPage(@RequestBody SysRole sysRole){
        return sysRoleService.getPage(sysRole);
    }

    @RequestMapping("")
    public String getById(@RequestParam String roleId){
        return "getById";
    }
@RequestMapping("add")
    public String add(){
        return "role add";
    }
    @RequestMapping("update")
    public String update(){
        return "role update";
    }

}
